<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="com.tjtt.common.utils.DateUtilsAll"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String mainid = request.getParameter("mainid");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">   
<html>
  <head>
    <base target="_self"/>
	<%@ include file="../jslib/jquerylib.jsp" %> 
	<link rel="stylesheet" type="text/css" href="<%=path %>/web/style/layout.css" />
    <script type="text/javascript" src="<%=path %>/jslib/jquery.validate.min.js"></script>
    <script type='text/javascript' src="<%=request.getContextPath() %>/jslib/My97DatePicker/WdatePicker.js"  defer="defer"></script>
    <script type='text/javascript' src="<%=request.getContextPath() %>/jslib/jquery.form.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath() %>/jslib/additional-methods.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/themes/icon.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/demo.css" />
	<script type="text/javascript" src="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/jslib/lhgdialog/lhgcore.lhgdialog.min.js?skin=mac"></script>
    <c:if test="${requestScope.message!=null}">
		<script type="text/javascript">
 	 		     alert('<c:out value="${requestScope.message}"></c:out>');
 	 		     window.close();
 		</script>
	</c:if>
	<style type="text/css">
 		body{
 			background:#ffffff; background-image:url(images/);
 			
 		}
   		html{
		    overflow-x: hidden;
			overflow-y: auto;
		}  	
		.formTableNew textarea{border: 1px solid #999;padding: 5px;width: 760px;-moz-border-radius: 3px;border-radius: 3px;margin-bottom: 5px;color: #666;background: url(../images/input_bg.gif) repeat-x top;}
   </style>	
 
  	<script type="text/javascript">
  		var api = frameElement.api, W = api.opener; 
    	var stateValue="";
   		$(document).ready(function(){
		  	     //提交  
		var options = {
		  	    url:'<%=request.getContextPath() %>/reportUpdateAction!reportpizhun.action?steptype='+$("#steptype0").val()+'&taskinfoid='+${taskinfoid},
		  	     beforeSubmit: function() {
		   				return true;
		    			},
		  	    dataType:'json',
		  	    success: function(data) {
		  	    //alert(data);
		  	      if(data.result=='success'){
					alert("提交成功");
				//	window.close();
					api.close();
					W.reload();
		  	      }
		  	    }};
		$('#saveBtn').click(function(){
			    	$('#pageFrom').ajaxSubmit(options);
	 	            return false;
    	 });
    	$('#closeBtn').click(function(){
    		api.close();
			//window.close();
		});						
	 }); 
	
	//查看报告
		function showBG(operate_type){
			var ids = '${ids}';
			var FTaskId = '${FTaskId}';
			var FId = '${requestScope.FId}';
		    var returnValue = window.showModalDialog("<%=basePath%>/view/report_update_chakanbaogao.jsp?ids="+ids+"&taskId="+FTaskId+"&childFlowid="+FTaskId+"&operateType="+operate_type+"&mainid="+FId,'',"dialogWidth=1050px;dialogHeight=650px;scroll:yes");
		}
	
  	</script>
   </head>
  <body>
     <form id="pageFrom" action="" enctype="multipart/form-data" method="post">
    	 <input type="hidden" id="flag" name="flag" />
        <input type="hidden" name="flowid" id="flowid" value="${flowid}" />
        <input type="hidden" name="flowtaskid" id="flowtaskid" value="${flowtaskid}" />
     	<input type="hidden" name="stateid" id="stateid" value="${stateid}" />
     	<input type="hidden" id="re_id" name="re_id" value="${reportUpdate.re_id}" />
     	<input type="hidden" id="baogaopath" name="baogaopath" value="${requestScope.baogaopath}" />
  		<table width="50%" border="0" align="center" cellpadding="5" cellspacing="5" class="formTableNew" style="padding-top: 20px">
  			 <tr>
			  <td align="right" style="width:80px">流程名称:</td>
     		<td align="left">
     		<input type="text" id="flowname" name="flowname" maxlength="50" value="${flowname }" style="border: 1px solid #999;padding: 5px;width:250px;"/>
     		<img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img></td>
     		</tr>
  			<tr>
     		<td align="right">申请人:</td>
  			  <td align="left">
  			  	 <input  type="text" readonly id="re_shenqingren" maxlength="50"  name="re_shenqingren" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${reportUpdate.re_shenqingren }" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">申请原因：</td>
  			  <td align="left">
  			    <input  type="text" readonly id="re_shenqingyuanyin" maxlength="50" name="re_shenqingyuanyin" style="border: 1px solid #999;padding: 5px;width: 250px;"  value="${reportUpdate.re_shenqingyuanyin }" />
  			  </td>
  			  </tr>
  			<tr>
  			  <td align="right">申请时间：</td>
  			  <td align="left">
  			    <input  type="text" readonly id="re_shenqingtime" maxlength="50" name="re_shenqingtime" style="border: 1px solid #999;padding: 5px;width: 250px;"  value="${reportUpdate.re_shenqingtime }"/>
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">错误类型：</td>
  			  <td align="left">
  			  	<input  type="text" readonly id="re_shenqingtime" maxlength="50" name="re_shenqingtime" style="border: 1px solid #999;padding: 5px;width: 250px;"  value="${reportUpdate.re_cuowuleixing }"/>
  			  </td>
  			  </tr>
  			<tr>
  			  <td align="right">委托单号：</td>
  			  <td align="left">
  			    <input  type="text" id="re_weituodanhao" maxlength="50" name="re_weituodanhao" style="border: 1px solid #999;padding: 5px;width: 250px;"  value="${reportUpdate.re_weituodanhao}" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">委托人：</td>
  			  <td align="left">
  			    <input  type="text" id="re_weituoren" maxlength="50" name="re_weituoren" style="border: 1px solid #999;padding: 5px;width: 250px;"  value="${reportUpdate.re_weituoren}" />
  			  </td>
  			  </tr>
  			<tr>
  			  <td align="right">委托单位：</td>
  			  <td align="left">
  			    <input  type="text" id="re_weituodanwei" maxlength="50" name="re_weituodanwei" style="border: 1px solid #999;padding: 5px;width: 250px;"  value="${reportUpdate.re_weituodanwei}"/>
  			  </td>
  			</tr>
			<tr><td align="right">下一步骤：</td>
			    <td colspan="3">${steptcontent}</td>
			</tr>
            <tr>   
			<td align="center" colspan="2">
				<input type="button" id="showReBtn" value="查看报告" onclick="showBG('1')" class="form_bt_grey" />
		    	<input id="saveBtn" type="button" value="提 交"  class="form_bt_orange" />
		    	<input type="button" id="closeBtn" value="取 消" class="form_bt_grey" />
		    </td>
		  </tr>
		</table>
	<!--表单结束-->
	</form>
  </body>
</html>
